/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.garethc.designpatterns.creational.abstractfactory;

import za.ac.cput.garethc.designpatterns.creational.factorymethod.Animal;
import za.ac.cput.garethc.designpatterns.creational.factorymethod.Cat;
import za.ac.cput.garethc.designpatterns.creational.factorymethod.Dog;

/**
 *
 * @author Gareth
 */
public class MammalFactory extends SpeciesFactory {
    @Override
    public Animal getAnimal(String type) 
    {
        if("dog".equals(type)) 
        {
            return new Dog();
        } 
        else 
        {
            return new Cat();
        }
    }
    
}
